import request from '@/utils/request'

// 查询检验申请主列表 (分页)
export function selectPageLabApply(query: any) {
    return request({
        url: '/business/labApply/selectPage',
        method: 'get',
        params: query
    })
}

// 查询检验申请主列表 (不分页)
export function listLabApply(query: any) {
    return request({
        url: '/business/labApply/list',
        method: 'get',
        params: query
    })
}

// 查询检验申请主详细
export function getLabApply(id: any) {
    return request({
        url: '/business/labApply/' + id,
        method: 'get'
    })
}

// 新增检验申请主
export function addLabApply(data: any) {
    return request({
        url: '/business/labApply',
        method: 'post',
        data: data
    })
}

// 修改检验申请主
export function updateLabApply(data: any) {
    return request({
        url: '/business/labApply',
        method: 'put',
        data: data
    })
}

// 删除检验申请主
export function delLabApply(id: String) {
    return request({
        url: '/business/labApply/' + id,
        method: 'delete'
    })
}

// 申请退费
export function refundApplication(id: String, chargeFlag: String) {
    return request({
        url: '/business/labApply/refundApplication/' + id + '/' + chargeFlag,
        method: 'get'
    })
}

// 保存检查申请明显
export function saveLabApplyAndItem(data: any) {
    return request({
        url: '/business/labApply/saveLabApplyAndItem',
        method: 'post',
        data: data
    })
}


// 检验确认
export function labConfirmOk(data) {
    return request({
        url: "/business/labApply/labConfirmOk",
        method: "post",
        data: data,
    });
}


// 查询lis结果list
export function queryViewReport(query: any) {
  return request({
    url: '/business/labApply/queryViewReport',
    method: 'get',
    params: query
  })
}
